let filter = {
    enFy(val,route){
        console.log(val)
        var json = {
            zh:{
                desc: `请在先将设备进入等待联网的状态下`,
                desc2: `再将此二维码对准设备摄像头以便识别`,
                next: '下一步',
                password: '密码',
                Regenerate:'重新生成二维码'
            },
            en:{
                desc: `Please put the device into the state of waiting for networking first.`,
                desc2:'Then align this QR code to the device camera to identify.',
                next: 'next',
                password: 'password',
                Regenerate:'Regenerate QR Code'
            }
        }
        if (route.query.language){
            if (route.query.language ==='en_US'){
                return json.en[val]
            }
        }else{
            return json.zh[val]
        }
    }
};

Object.assign(filter, {
    isUse(val) {
        if (val === -1) {
            return '冻结'
        }
        if (val === 1) {
            return '正常'
        }
    }
})

export default filter;